package com.example.tests;

import org.testng.annotations.Test;
import java.util.Set;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;


public class GroupRemovalTests extends TestBase {
	
	protected void verifyGroupRemoved(Set<GroupObject> oldList, Set<GroupObject> newList) {
		assertThat(newList.size(), equalTo(oldList.size()-1));
	}
	
	@Test
	public void testFirstGroupCanBeRemoved() throws Exception {
		Set<GroupObject> oldList = app.getGroupHelper().getGroups();
		app.getGroupHelper().deleteGroup(0);
		Set<GroupObject> newList = app.getGroupHelper().getGroups();
		verifyGroupRemoved(oldList, newList);
	}

}
